﻿using System.Linq;
using System.Numerics;

namespace MartinRL.ProjectEuler
{
    /// <summary>
    /// http://projecteuler.net/index.php?section=problems&id=16
    /// </summary>
    public static class Problem016
    {
         public static uint FindTheSumOfTheNumbersOf2Pow1000()
         {
             var twoRaisedToThePowerOf1000 = new BigInteger(1);
             twoRaisedToThePowerOf1000 <<= 1000;

             return twoRaisedToThePowerOf1000
                    .ToString()
                    .ToByteSequence()
                    .Sum();
         }
    }
}